Skip to content

Replace langchaingo with stdlib net/http for security and reliability#3

Merged
aksOps merged 1 commit into
mainfrom
claude/rename-package-fix-install-s3HlB
Mar 17, 2026
Merged

Replace langchaingo with stdlib net/http for security and reliability#3
aksOps merged 1 commit into
mainfrom
claude/rename-package-fix-install-s3HlB

Conversation

@aksOps

@aksOps aksOps commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Remove github.com/tmc/langchaingo v0.1.13 and rewrite azure.go and
ollama.go using Go's standard library (net/http, encoding/json) — the
same secure pattern already used by huggingface.go.

- azure.go: direct REST calls to Azure OpenAI chat/completions and
  embeddings endpoints with api-key header auth
- ollama.go: direct REST calls to Ollama /api/generate and /api/embed
  using Ollama's native JSON API (no auth required)
- go.mod/go.sum: remove langchaingo and its exclusive transitive deps
  (dlclark/regexp2, pkoukk/tiktoken-go, pkg/errors), reducing the
  dependency attack surface

No interface changes — all callers of llm.Provider are unaffected.

https://claude.ai/code/session_012X8wf4jwQFRYfMnbbWCEs5
@aksOps aksOps merged commit 6e67c52 into main Mar 17, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants